-- GENERATED SPELL FOR [Foreman Rigger] --


function spell0_5931(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(6533,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5931', 2301, 1)
end

function spell1_5931(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(6016,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5931', 20000, 1)
end

function Sorts_5931(pUnit, Event)
local choix_sorts_5931 = math.random(0, 1)
if choix_sorts_5931 == 0 then
pUnit:RegisterEvent('spell0_5931', 1, 1)
end
if choix_sorts_5931 == 1 then
pUnit:RegisterEvent('spell1_5931', 1, 1)
end
end

function mob5931_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5931', math.random(1500, 3000), 1)
end

function mob5931_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5931_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5931_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5931, 1, 'mob5931_Action')
RegisterUnitEvent(5931, 2, 'mob5931_Leave')
RegisterUnitEvent(5931, 3, 'mob5931_Kill')
RegisterUnitEvent(5931, 4, 'mob5931_Die')
